# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-ref-util
pkgver=0.204
pkgrel=1
pkgdesc="Utility functions for checking references"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/release/Ref-Util"
depends=('perl')
checkdepends=('perl-ref-util-xs' 'perl-readonly')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/A/AR/ARC/Ref-Util-$pkgver.tar.gz")
sha512sums=('12834e13de5578232e40ba308e97786c60fcec4da9dc0b2922506d42645e8b3c3234663cf3b9c1dc374772107de953ed49ba8b52a2bac79183e3860338c0b288')

build() {
  cd Ref-Util-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Ref-Util-$pkgver
  make test
}

package() {
  cd Ref-Util-$pkgver
  make DESTDIR="$pkgdir" install
}
